<template>
	<view class="c-container no-border c-container-item">
		<swiper :indicator-dots="true">
			<swiper-item v-for="(item, index) in car" :key="index">
				<view class="swiper-item">
					<view class="c-row">
						<view class="c-row-col">
							<view class="col-title">执行公司</view>
							<view class="col-text">{{item.company}}</view>
						</view>
						<view class="c-row-col">
							<view class="col-title">车辆类型</view>
							<view class="col-text">{{item.is_master == 1 ? '主车' : '跟车'}}</view>
						</view>
					</view>
					<view class="c-row">
						<view class="c-row-col">
							<view class="col-title">车辆型号</view>
							<view class="col-text">{{item.title}}</view>
						</view>
						<view class="c-row-col">
							<view class="col-title">车辆数量</view>
							<view class="col-text">{{item.car_amount}}</view>
						</view>
					</view>
					<view class="c-row">
						<view class="c-row-col">
							<view class="col-title">车辆价格</view>
							<view class="col-text">{{item.car_price}}</view>
						</view>
						<view class="c-row-col">
							<view class="col-title">收款时间</view>
							<view class="col-text">
								<view class="date">{{item.create_time}}</view>
							</view>
						</view>
					</view>
					<view class="c-row">
						<view class="c-row-col">
							<view class="col-title">审核状态</view>
							<view class="col-text" :style="{ color: status[item.item_check_status].color }">{{status[item.item_check_status].title}}</view>
						</view>
					</view>
					<view class="c-row" v-if="item.car_remark">
						<view class="c-row-col">
							<view class="col-title">备注</view>
							<view class="col-text">{{item.car_remark}}</view>
						</view>
					</view>
				</view>
			</swiper-item>

		</swiper>
	</view>
</template>

<script>
	export default {
		props: {
			car: {
				type: Array,
				default () {
					return []
				}
			}
		},
		data() {
			return {
				status: {
					0: {
						title: '待审核',
						color: '#999'
					},
					1: {
						title: '审核中',
						color: '#999'
					},
					2: {
						title: '审核通过',
						color: '#409EFF'
					},
					3: {
						title: '审核驳回',
						color: 'red'
					},
					13: {
						title: '已撤销',
						color: '#999'
					}
				}
			}
		},
		methods: {
			// 预览图片
			previewImg(data) {
				uni.previewImage({
					urls: data.list,
					current: data.index
				})
			}
		}
	}
</script>

<style lang="less">
	@import url('../../common.less');
</style>
